package heritage.single.table;

import java.util.Date;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;

@Entity
@DiscriminatorValue(value = "cc")
public class CompteCourant extends Compte {

	private static final long serialVersionUID = 7902389807454638730L;
	
	private double decouvert;

	public CompteCourant() {
	}

	public CompteCourant(String codeCompte, Date dateCreation, double solde,
			double decouvert) {
		super(codeCompte, dateCreation, solde);
		this.decouvert = decouvert;
	}

	public double getDecouvert() {
		return decouvert;
	}

	public void setDecouvert(double decouvert) {
		this.decouvert = decouvert;
	}

	@Override
	public String toString() {
		return "CompteCourant [decouvert=" + decouvert + ", codeCompte="
				+ codeCompte + ", dateCreation=" + dateCreation + ", solde="
				+ solde + "]";
	}
}
